from flask import Blueprint, render_template, request, jsonify
from exts.db import dbexeclist
import sql

api = Blueprint('api', __name__)


@api.route('/left1')
def left1():
    x = dbexeclist(sql.sql1x)
    y = dbexeclist(sql.sql1y)
    res = {
        'x': x,
        'y': y
    }
    return jsonify(res)


@api.route('/left2')
def left2():
    x = dbexeclist(sql.sql2x)
    y = dbexeclist(sql.sql2y)
    res = {
        'x': x,
        'y': y
    }
    return jsonify(res)
